console.log('mysql connecting...');
var http=require('http');
var mysql =require('mysql');
console.log('loging...');
var connection=mysql.createConnection({
    host:'119.23.182.180',
    user:'srp',
    password:'srp',
    database:'mymess',
    port:3306
});

http.createServer((req,res)=>{
    res.writeHead(200,{'Content-Type':'text/html;charset=utf8'});
    res.write('<h1>mysql</h1>')
    connection.connect((err)=>{
        if(err){
            res.end('<h1>ERROR</h1>');
            return ;
        }else {
            res.end('<h1>SCUUESS</h1>');
        }
    })
}).listen(6868);